home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-12-08 | 11.1 KB | 630 lines | [TEXT/????] |
- ----> &null
- copy(1) ----> 1
- copy("abc") ----> "abc"
- copy('aabbcc') ----> 'abc'
- copy(main) ----> procedure main
- copy([1,2,3]) ----> list_2(3)
- copy(table(0)) ----> table_2(0)
- copy() ----> &null
- copy(&input) ----> &input
- w := copy(write) ----> function write
- function write
- w(image(w)) ----> "function write"
- copy(array()) ----> record array_2(7)
- copy := copy(copy) ----> function copy
- x := copy(array) ----> record constructor array
- x := x(1,2,3,4,5,6,7) ----> record array_3(7)
- x[-4] ----> 4
- v := copy(c) ----> &null
- x := repl("123",4) ----> "123123123123"
- t := table() ----> table_3(0)
- every i := 1 to 100 do t[i] := i ----> none
- x := sort(t) ----> list_3(100)
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
- every write((!x)[2]) ----> none
- d
- d
- d
- cd
- cd
- cd
- cde
- cde
- cde
- bcde
- bcde
- bcde
- bcdef
- bcdef
- bcdef
- abcdef
- abcdef
- abcdef
- abcdef
- abcdef0
- abcdef-
- abcdef
- 0abcdef0
- =abcdef-
- abcdef
- 0abcdef00
- =abcdef=-
- abcdef
- 00abcdef00
- =-abcdef=-
- abcdef
- 00abcdef000
- =-abcdef-=-
- abcdef
- 000abcdef000
- =-=abcdef-=-
- abcdef
- 000abcdef0000
- =-=abcdef=-=-
- abcdef
- 0000abcdef0000
- =-=-abcdef=-=-
- abcdef
- 0000abcdef00000
- =-=-abcdef-=-=-
- abcdef
- 00000abcdef00000
- =-=-=abcdef-=-=-
- abcdef
- 00000abcdef000000
- =-=-=abcdef=-=-=-
- abcdef
- 000000abcdef000000
- =-=-=-abcdef=-=-=-
- abcdef
- 000000abcdef0000000
- =-=-=-abcdef-=-=-=-
- abcdef
- 0000000abcdef0000000
- =-=-=-=abcdef-=-=-=-
- every write(center("abcdef",1 to 20," " | "0" | "=-")) ----> none
- a
- a
- a
- ab
- ab
- ab
- abc
- abc
- abc
- abcd
- abcd
- abcd
- abcde
- abcde
- abcde
- abcdef
- abcdef
- abcdef
- abcdef
- abcdef0
- abcdef-
- abcdef
- abcdef00
- abcdef=-
- abcdef
- abcdef000
- abcdef-=-
- abcdef
- abcdef0000
- abcdef=-=-
- abcdef
- abcdef00000
- abcdef-=-=-
- abcdef
- abcdef000000
- abcdef=-=-=-
- abcdef
- abcdef0000000
- abcdef-=-=-=-
- abcdef
- abcdef00000000
- abcdef=-=-=-=-
- abcdef
- abcdef000000000
- abcdef-=-=-=-=-
- abcdef
- abcdef0000000000
- abcdef=-=-=-=-=-
- abcdef
- abcdef00000000000
- abcdef-=-=-=-=-=-
- abcdef
- abcdef000000000000
- abcdef=-=-=-=-=-=-
- abcdef
- abcdef0000000000000
- abcdef-=-=-=-=-=-=-
- abcdef
- abcdef00000000000000
- abcdef=-=-=-=-=-=-=-
- every write(left("abcdef",1 to 20," " | "0" | "=-")) ----> none
- f
- f
- f
- ef
- ef
- ef
- def
- def
- def
- cdef
- cdef
- cdef
- bcdef
- bcdef
- bcdef
- abcdef
- abcdef
- abcdef
- abcdef
- 0abcdef
- =abcdef
- abcdef
- 00abcdef
- =-abcdef
- abcdef
- 000abcdef
- =-=abcdef
- abcdef
- 0000abcdef
- =-=-abcdef
- abcdef
- 00000abcdef
- =-=-=abcdef
- abcdef
- 000000abcdef
- =-=-=-abcdef
- abcdef
- 0000000abcdef
- =-=-=-=abcdef
- abcdef
- 00000000abcdef
- =-=-=-=-abcdef
- abcdef
- 000000000abcdef
- =-=-=-=-=abcdef
- abcdef
- 0000000000abcdef
- =-=-=-=-=-abcdef
- abcdef
- 00000000000abcdef
- =-=-=-=-=-=abcdef
- abcdef
- 000000000000abcdef
- =-=-=-=-=-=-abcdef
- abcdef
- 0000000000000abcdef
- =-=-=-=-=-=-=abcdef
- abcdef
- 00000000000000abcdef
- =-=-=-=-=-=-=-abcdef
- every write(right("abcdef",1 to 20," " | "0" | "=-")) ----> none
- center("",20,repl("x.",30)) ----> "x.x.x.x.x.x.x.x.x.x."
- left("",20,repl("x.",30)) ----> "x.x.x.x.x.x.x.x.x.x."
- right("",20,repl("x.",30)) ----> "x.x.x.x.x.x.x.x.x.x."
- a
- aa
- aaa
- aaaa
- aaaaa
- ab
- abab
- ababab
- abababab
- ababababab
- ba
- baba
- bababa
- babababa
- bababababa
- every write(repl("a" | "ab" | "ba",1 to 5)) ----> none
- repl("",0) ----> ""
- repl(&cset,0) ----> ""
- trim(&lcase) ----> "abcdefghijklmnopqrstuvwxyz"
- trim(&lcase,&lcase) ----> ""
- image(2) ----> "2"
- image('cab') ----> "'abc'"
- image(&lcase) ----> "&lcase"
- image('abcdefghijklmnopqrstuvwxyz') ----> "&lcase"
- image(&input) ----> "&input"
- image() ----> "&null"
- image(&null) ----> "&null"
- image([1,2,3]) ----> "list_104(3)"
- image([]) ----> "list_105(0)"
- image([,]) ----> "list_106(2)"
- image(table()) ----> "table_4(0)"
- image(table(3)) ----> "table_5(0)"
- image(list(0)) ----> "list_107(0)"
- image(set()) ----> "set_1(0)"
- image(set([1,2,3,3,3,3,3,4])) ----> "set_2(4)"
- image(repl) ----> "function repl"
- image(main) ----> "procedure main"
- image(repl(&lcase,10)) ----> "\"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\""
- image(array) ----> "record constructor array"
- image(a) ----> "&null"
- image(array) ----> "record constructor array"
- image(image) ----> "function image"
- string(2) ----> "2"
- string("2") ----> "2"
- string(" 2") ----> " 2"
- string("2 ") ----> "2 "
- string("+2") ----> "+2"
- string("-2") ----> "-2"
- string("- 2") ----> "- 2"
- string(" - 2 ") ----> " - 2 "
- string("") ----> ""
- string("--2") ----> "--2"
- string(" ") ----> " "
- string("-") ----> "-"
- string("+") ----> "+"
- string("22222222222222222222222222222222222222222222222222222222222") ----> "22222222222222222222222222222222222222222222222222222222222"
- string("7r4") ----> "7r4"
- string("4r7") ----> "4r7"
- string("4r 7") ----> "4r 7"
- string("7r 4") ----> "7r 4"
- string("16rff") ----> "16rff"
- string("36rcat") ----> "36rcat"
- string("36Rcat") ----> "36Rcat"
- string("36rCAT") ----> "36rCAT"
- string("1r1") ----> "1r1"
- string("2r0") ----> "2r0"
- type(0) ----> "integer"
- type("abc") ----> "string"
- type('aba') ----> "cset"
- type() ----> "null"
- type(&null) ----> "null"
- type([]) ----> "list"
- type(table()) ----> "table"
- type(main) ----> "procedure"
- type(write) ----> "procedure"
- type(array()) ----> "array"
- type(array) ----> "procedure"
- type(f) ----> "null"
- cset(2) ----> '2'
- cset("2") ----> '2'
- cset(" 2") ----> ' 2'
- cset("2 ") ----> ' 2'
- cset("+2") ----> '+2'
- cset("-2") ----> '-2'
- cset("- 2") ----> ' -2'
- cset(" - 2 ") ----> ' -2'
- cset("") ----> ''
- cset("--2") ----> '-2'
- cset(" ") ----> ' '
- cset("-") ----> '-'
- cset("+") ----> '+'
- cset("22222222222222222222222222222222222222222222222222222222222") ----> '2'
- cset("7r4") ----> '47r'
- cset("4r7") ----> '47r'
- cset("4r 7") ----> ' 47r'
- cset("7r 4") ----> ' 47r'
- cset("16rff") ----> '16fr'
- cset("36rcat") ----> '36acrt'
- cset("36Rcat") ----> '36Ract'
- cset("36rCAT") ----> '36ACTr'
- cset("1r1") ----> '1r'
- cset("2r0") ----> '02r'
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- every write(seq()) \ 10 ----> none
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- every write(seq(2)) \ 10 ----> none
- -10
- -9
- -8
- -7
- -6
- -5
- -4
- -3
- -2
- -1
- every write(seq(-10)) \ 10 ----> none
- 1
- 4
- 7
- 10
- 13
- 16
- 19
- 22
- 25
- 28
- every write(seq(,3)) \ 10 ----> none
- ----> &null
- f := open("foo.baz","w") ----> file(foo.baz)
- write(f,"hello world") ----> "hello world"
- close(f) ----> file(foo.baz)
- F := open("gc1.icn") ----> file(gc1.icn)
- )(niam erudecorp
- { od 001 ot 1 yreve
- )snoitcelloc&(etirw
- od 001 ot 1 yreve
- )0001(tsil
- }
- )"... gnitcelloc"(etirw
- )(tcelloc
- { od )0001 ot 1,"x"(lper =: s yreve
- ))esacl&(gnirts(tesc
- )(elbat =: t
- )]s[(tes
- ]5 : 2[s
- }
- dne
- every write(reverse(!F)) ----> none
- close(F) ----> file(gc1.icn)
- F := open("gc1.icn") ----> file(gc1.icn)
- procedure main()
- every 1 to 100 do {
- write(&collections)
- every 1 to 100 do
- list(1000)
- }
- write("collecting ...")
- collect()
- every s := repl("x",1 to 1000) do {
- cset(string(&lcase))
- t := table()
- set([s])
- s[2 : 5]
- }
- end
- every write(map(!F)) ----> none
- close(F) ----> file(gc1.icn)
- F := open("gc1.icn") ----> file(gc1.icn)
- pr-c-d-r- m--n()
- -v-ry 1 t- 100 d- {
- wr-t-(&c-ll-ct--ns)
- -v-ry 1 t- 100 d-
- l-st(1000)
- }
- wr-t-("c-ll-ct-ng ...")
- c-ll-ct()
- -v-ry s := r-pl("x",1 t- 1000) d- {
- cs-t(str-ng(&lc-s-))
- t := t-bl-()
- s-t([s])
- s[2 : 5]
- }
- -nd
- every write(map(!F,&cset || "aeiou",&cset || "-----")) ----> none
- close(F) ----> file(gc1.icn)
- F := open("gc1.icn") ----> file(gc1.icn)
- procedureumain()
- uuueveryu1utou100udou{
- uuuuuuwrite(&collections)
- uuuuuueveryu1utou100udo
- uuuuuuuuulist(1000)
- uuuuuu}
- uuuwrite("collectingu...")
- uuucollect()
- uuueveryusu:=urepl("x",1utou1000)udou{
- uuuuuucset(string(&lcase))
- uuuuuutu:=utable()
- uuuuuuset([s])
- uuuuuus[2u:u5]
- uuuuuu}
- end
- every write(map(!F,&cset || " ",&cset || "aeiou")) ----> none
- close(F) ----> file(gc1.icn)
- f := open("gc1.icn") ----> file(gc1.icn)
- procedure main()
- every 1 to 100 do {
- write(&collections)
- every 1 to 100 do
- list(1000)
- }
- write("collecting ...")
- collect()
- every s := repl("x",1 to 1000) do {
- cset(string(&lcase))
- t := table()
- set([s])
- s[2 : 5]
- }
- end
- while writes(reads(f)) ----> none
- close(f) ----> file(gc1.icn)
- f := open("gc1.icn") ----> file(gc1.icn)
- procedure main()
- every 1 to 100 do {
- write(&collections)
- every 1 to 100 do
- list(1000)
- }
- write("collecting ...")
- collect()
- every s := repl("x",1 to 1000) do {
- cset(string(&lcase))
- t := table()
- set([s])
- s[2 : 5]
- }
- end
- while writes(reads(f,10)) ----> none
- f := open("gc1.icn") ----> file(gc1.icn)
- procedure main()
- every 1 to 100 do {
- write(&collections)
- every 1 to 100 do
- list(1000)
- }
- write("collecting ...")
- collect()
- every s := repl("x",1 to 1000) do {
- cset(string(&lcase))
- t := table()
- set([s])
- s[2 : 5]
- }
- end
- while write(read(f)) ----> none
- close(f) ----> file(gc1.icn)
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 0.25 1.318 0.252 0.244 0.083 0.968 0.247 0.255 0.5 1.284 -1.38 -1.26
- 0.5 1.047 0.523 0.463 0.165 0.877 0.479 0.546 0.707 1.648 -0.69 -0.63
- 0.75 0.722 0.848 0.643 0.244 0.731 0.681 0.931 0.866 2.117 -0.28 -0.26
- 1.0 0.0 1.570 0.785 0.321 0.540 0.841 1.557 1.0 2.718 0.0 0.0
- 1.25 0.896 0.394 0.315 0.948 3.009 1.118 3.490 0.223 0.203
- 1.5 0.982 0.463 0.070 0.997 14.10 1.224 4.481 0.405 0.369
- 1.75 1.051 0.528 -0.17 0.983 -5.52 1.322 5.754 0.559 0.509
- 2.0 1.107 0.588 -0.41 0.909 -2.18 1.414 7.389 0.693 0.630
- 2.25 1.152 0.643 -0.62 0.778 -1.23 1.5 9.487 0.810 0.738
- 2.5 1.190 0.694 -0.80 0.598 -0.74 1.581 12.18 0.916 0.834
- 2.75 1.222 0.741 -0.92 0.381 -0.41 1.658 15.64 1.011 0.920
- 3.0 1.249 0.785 -0.98 0.141 -0.14 1.732 20.08 1.098 1.0
- 3.25 1.272 0.825 -0.99 -0.10 0.108 1.802 25.79 1.178 1.072
- 3.5 1.292 0.862 -0.93 -0.35 0.374 1.870 33.11 1.252 1.140
- 3.75 1.310 0.896 -0.82 -0.57 0.696 1.936 42.52 1.321 1.203
- 4.0 1.325 0.927 -0.65 -0.75 1.157 2.0 54.59 1.386 1.261
- 4.25 1.339 0.956 -0.44 -0.89 2.006 2.061 70.10 1.446 1.317
- 4.5 1.352 0.982 -0.21 -0.97 4.637 2.121 90.01 1.504 1.369
- 4.75 1.363 1.007 0.037 -0.99 -26.5 2.179 115.5 1.558 1.418
- 5.0 1.373 1.030 0.283 -0.95 -3.38 2.236 148.4 1.609 1.464
- 5.25 1.382 1.051 0.512 -0.85 -1.67 2.291 190.5 1.658 1.509
- 5.5 1.390 1.071 0.708 -0.70 -0.99 2.345 244.6 1.704 1.551
- 5.75 1.398 1.089 0.861 -0.50 -0.59 2.397 314.1 1.749 1.592
- 6.0 1.405 1.107 0.960 -0.27 -0.29 2.449 403.4 1.791 1.630
- 6.25 1.412 1.123 0.999 -0.03 -0.03 2.5 518.0 1.832 1.668
-